import axios from './axios'
export default {
    //获取产品分类
    getAllCanp(){
        return axios({
            url:'/classifys/getClassifys',
            method:'get',
            params:{}
        })
    },
    //根据id获取详情产品
    getCanpById(params){
        return axios({
            url:'/classifys/idClassifys',
            method:'get',
            params
        })
    },
    //
    getByed(data){
       
        return axios({
            url:'/kehu/getByed',
            method:'post',
            data
        })
    },
    //购买
    bycentext(data){
        return axios({
            url:'/kehu/bycentext',
            method:'post',
            data
        })
    },
    //获取购物车
    getCar(params){
        return axios({
            url:'/car/getCar',
            method:'get',
            params:{
                _id:params._id
            }
        })
    },
    //加入购物车
    setCar(data){
        return axios({
            url:'/car/setCar',
            method:'post',
            data
        })
    },
    //根据id删除购物车
    deleCar(data){
        return axios({
            url:'/car/deleCar',
            method:'post',
            data
        })
    },
    //一键购买
    byAllCanp(data){
        return axios({
            url:'/kehu/byAllCanp',
            method:'post',
            data
        })
    }
    

}